#ifndef CL_COMPILER_H
#define CL_COMPILER_H
#include <iostream>
#include <cstdlib>
#include <utility>
#include <string>
#include <fstream>
#include <iterator>
#define __NO_STD_VECTOR
#include <CL/cl.hpp>
#include "../opperations.h"
#include "generator.h"
using namespace std;

class CL_compiler
{
    public:
        CL_compiler(const char * name);
        virtual ~CL_compiler();
        double compute(op ops);
        void invoke();
    protected:
    private:
        cl_int err;
        cl::Context * contptr;
        cl::vector<cl::Device> devices;
        char * buffer;
        inline void checkErr(cl_int err, const char * name);
        double * retv;
        cl::Event event;
        cl::Kernel * kernptr;
        ifstream file;
        op * global_ops;
};

#endif // CL_COMPILER_H
